<?php

namespace App\Providers;

use App\Http\ViewComposers\ArticleCategoryComposer;
use App\Http\ViewComposers\ConfigComposer;
use App\Http\ViewComposers\SlideComposer;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;

class ViewServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        View::composer(['index.*.*'], ConfigComposer::class);
        View::composer(['index.layouts._header', 'index.layouts._footer'], ArticleCategoryComposer::class);
        View::composer(['index.layouts._slider'], SlideComposer::class);
    }
}
